home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
Xm
/
XmQTcareParentVisual.z
/
XmQTcareParentVisual
Wrap
Text File
|
1998-10-30
|
11KB
|
199 lines
XXXXmmmmQQQQTTTTccccaaaarrrreeeePPPPaaaarrrreeeennnnttttVVVViiiissssuuuuaaaallll((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmQQQQTTTTccccaaaarrrreeeePPPPaaaarrrreeeennnnttttVVVViiiissssuuuuaaaallll((((3333XXXX))))
NNNNAAAAMMMMEEEE
_X_m_Q_T_c_a_r_e_P_a_r_e_n_t_V_i_s_u_a_l - A child widget holding this trait
wants to be notified whenever its parent's visual state
changes
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
#include <Xm/CareVisualT.h>
typedef struct {
int version;
XmCareVisualRedrawProc redraw;
} XmCareVisualTraitRec, *XmCareVisualTrait;
BBBBoooooooolllleeeeaaaannnn ((((****XXXXmmmmCCCCaaaarrrreeeeVVVViiiissssuuuuaaaallllRRRReeeeddddrrrraaaawwwwPPPPrrrroooocccc))))(
WWWWiiiiddddggggeeeetttt,
WWWWiiiiddddggggeeeetttt,
WWWWiiiiddddggggeeeetttt,
MMMMaaaasssskkkk);
VVVVEEEERRRRSSSSIIIIOOOONNNN
This page documents Motif 2.1.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The appearance of many primitive widgets depends on the
colors and pixmaps of their parents. For example, Motif
button widgets use the background color and background
pixmap of their parents in order to unhighlight themselves.
Therefore, Motif primitive widgets that depend on their
parent's appearance need to be alerted whenever their
parent's appearance changes. The alerting mechanism is the
_X_m_Q_T_c_a_r_e_P_a_r_e_n_t_V_i_s_u_a_l trait. A child widget holding this
trait wants to be notified whenever there is a change in its
parent's visual appearance that may affect it.
All Manager widgets must notify their children whenever the
Manager's visual appearance changes. The sssseeeettttVVVVaaaalllluuuueeeessss method of
the XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrrwidget takes care of this notification for all
of its subclasses. Therefore, if you are writing a subclass
of Manager, you ordinarily do not have to provide any code
to notify children of these visual changes. However,
Manager does not notify its children of changes to
SelectColor. Therefore, if you are writing a subclass of
Manager that needs to notify its children about changes to
SelectColor, then your subclass of Manager will need to call
its children's _r_e_d_r_a_w trait method.
The XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee widget and all its subclasses hold this
trait. Therefore, if you are writing a subclass of
Primitive, the _X_m_Q_T_c_a_r_e_P_a_r_e_n_t_V_i_s_u_a_l trait will automatically
be installed on it.
TTTThhhheeee rrrreeeeddddrrrraaaawwww TTTTrrrraaaaiiiitttt MMMMeeeetttthhhhoooodddd
BBBBoooooooolllleeeeaaaannnn rrrreeeeddddrrrraaaawwww(
Page 1 (printed 10/24/98)
XXXXmmmmQQQQTTTTccccaaaarrrreeeePPPPaaaarrrreeeennnnttttVVVViiiissssuuuuaaaallll((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmQQQQTTTTccccaaaarrrreeeePPPPaaaarrrreeeennnnttttVVVViiiissssuuuuaaaallll((((3333XXXX))))
WWWWiiiiddddggggeeeetttt cccchhhhiiiillllddddWWWWiiiiddddggggeeeetttt,
WWWWiiiiddddggggeeeetttt ccccuuuurrrrrrrreeeennnnttttPPPPaaaarrrreeeennnnttttWWWWiiiiddddggggeeeetttt,
WWWWiiiiddddggggeeeetttt nnnneeeewwwwPPPPaaaarrrreeeennnnttttWWWWiiiiddddggggeeeetttt,
MMMMaaaasssskkkk vvvviiiissssuuuuaaaallllCCCChhhhaaaannnnggggeeeeMMMMaaaasssskkkk);
The _r_e_d_r_a_w trait method of XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee examines the
_v_i_s_u_a_l_C_h_a_n_g_e_M_a_s_k argument to see what has changed in the
visual appearance of its parent. If the parent's background
pixmap or background color has changed, then the _r_e_d_r_a_wtrait
method invokes the pppprrrriiiimmmmiiiittttiiiivvvveeee....bbbboooorrrrddddeeeerrrr____uuuunnnnhhhhiiiigggghhhhlllliiiigggghhhhttttmethod (if
unhighlighting is necessary).
If you are writing a primitive widget, you do not have to
provide a _r_e_d_r_a_w trait method _u_n_l_e_s_s your primitive widget
depends on its parent's appearance in a non-default way. In
this case, your _r_e_d_r_a_w trait method should probably envelop
the _r_e_d_r_a_w trait method of XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee.
_c_h_i_l_d_W_i_d_g_e_t
Specifies the child widget that is affected by
visual changes in its parent.
_c_u_r_r_e_n_t_P_a_r_e_n_t_W_i_d_g_e_t
Specifies the current parent widget.
_n_e_w_P_a_r_e_n_t_W_i_d_g_e_t
Specifies the new parent widget.
_v_i_s_u_a_l_C_h_a_n_g_e_M_a_s_k
Specifies a bit mask. Each bit in the mask
represents a different visual attribute of the
parent. If the bit is set, then that visual
attribute has changed. The bit mask may consist of
any combination of the following constants:
VVVViiiissssuuuuaaaallllFFFFoooorrrreeeeggggrrrroooouuuunnnndddd
Specifies a visual change in the
parent's foreground color.
VVVViiiissssuuuuaaaallllHHHHiiiigggghhhhlllliiiigggghhhhttttPPPPiiiixxxxmmmmaaaapppp
Specifies a visual change in the
parent's highlight pixmap.
VVVViiiissssuuuuaaaallllHHHHiiiigggghhhhlllliiiigggghhhhttttCCCCoooolllloooorrrr
Specifies a visual change in the
parent's highlight color.
VVVViiiissssuuuuaaaallllBBBBoooottttttttoooommmmSSSShhhhaaaaddddoooowwwwPPPPiiiixxxxmmmmaaaapppp
Specifies a visual change in the
parent's bottom shadow pixmap.
VVVViiiissssuuuuaaaallllBBBBoooottttttttoooommmmSSSShhhhaaaaddddoooowwwwCCCCoooolllloooorrrr
Page 2 (printed 10/24/98)
XXXXmmmmQQQQTTTTccccaaaarrrreeeePPPPaaaarrrreeeennnnttttVVVViiiissssuuuuaaaallll((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmQQQQTTTTccccaaaarrrreeeePPPPaaaarrrreeeennnnttttVVVViiiissssuuuuaaaallll((((3333XXXX))))
Specifies a visual change in the
parent's bottom shadow color.
VVVViiiissssuuuuaaaallllSSSSeeeelllleeeeccccttttCCCCoooolllloooorrrr
Specifies a visual change in the
parent's select color. (This is the only
visual change that XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr does not
process.)
VVVViiiissssuuuuaaaallllTTTTooooppppSSSShhhhaaaaddddoooowwwwPPPPiiiixxxxmmmmaaaapppp
Specifies a visual change in the
parent's top shadow pixmap.
VVVViiiissssuuuuaaaallllTTTTooooppppSSSShhhhaaaaddddoooowwwwCCCCoooolllloooorrrr
Specifies a visual change in the
parent's top shadow color.
VVVViiiissssuuuuaaaallllBBBBaaaacccckkkkggggrrrroooouuuunnnnddddPPPPiiiixxxxeeeellll
Specifies a visual change in the
parent's background color.
VVVViiiissssuuuuaaaallllBBBBaaaacccckkkkggggrrrroooouuuunnnnddddPPPPiiiixxxxmmmmaaaapppp
Specifies a visual change in the
parent's background pixmap.
The NNNNooooVVVViiiissssuuuuaaaallllCCCChhhhaaaannnnggggeeee constant symbolizes that
nothing has changed.
This method returns a Boolean value. A returned value of
_T_r_u_e means that the child needs to be redrawn. A returned
value of _F_a_l_s_e means that the child does not need to be
redrawn.
RRRREEEELLLLAAAATTTTEEEEDDDD
XXXXmmmmMMMMaaaannnnaaaaggggeeeerrrr(3) and XXXXmmmmPPPPrrrriiiimmmmiiiittttiiiivvvveeee(3).
Page 3 (printed 10/24/98)